package com.wsfk.ssm.tools;

import java.util.Map;

import org.apache.struts2.interceptor.RequestAware;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;

/***
 * 
 * @author zhangbao
 * 这里你可以添加自己的方法（常用的）
 */
public class BaseAction extends ActionSupport implements SessionAware,RequestAware {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	// session 对象
	protected Map<String, Object> session;
	// request 对象
	protected Map<String, Object> request;
	
	protected Pagination page = new Pagination();

	/**
	 * SessionAware implements
	 * */
	public void setSession(Map<String, Object> arg0) {
		this.session = arg0;
	}
	
	/**
	 * 获取session对象的方法
	 * */
	public Map<String, Object> getSession() {
		return session;
	}

	/**
	 * RequestAware implements
	 * */
	public void setRequest(Map<String, Object> arg0) {
		this.request = arg0;
	}
	
	/**
	 * 获取request对象的方法
	 * */
	public Map<String, Object> getRequest() {
		return request;
	}

	public Pagination getPage() {
		return page;
	}

	public void setPage(Pagination page) {
		this.page = page;
	}
	

}
